package demo

import (
    "fmt"
    "io/ioutil"

    aepapi "gitee.com/dell_software_department/ctwing_sdk/apis/Aep_rule_engine"
)

func SaasCreateRule_Demo() {
    resp, err := aepapi.SaasCreateRule("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("SaasCreateRule err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func SaasQueryRule_Demo() {
    resp, err := aepapi.SaasQueryRule("dFI1lzE0EN2", "xQcjrfNLvQ", "", "10015488", "", "")

    if err != nil {
        fmt.Println("SaasQueryRule err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func SaasUpdateRule_Demo() {
    resp, err := aepapi.SaasUpdateRule("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("SaasUpdateRule err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func SaasDeleteRuleEngine_Demo() {
    resp, err := aepapi.SaasDeleteRuleEngine("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("SaasDeleteRuleEngine err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func CreateRule_Demo() {
    resp, err := aepapi.CreateRule("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("CreateRule err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func UpdateRule_Demo() {
    resp, err := aepapi.UpdateRule("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("UpdateRule err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func DeleteRule_Demo() {
    resp, err := aepapi.DeleteRule("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("DeleteRule err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func GetRules_Demo() {
    resp, err := aepapi.GetRules("dFI1lzE0EN2", "xQcjrfNLvQ", "", "10015488", "", "")

    if err != nil {
        fmt.Println("GetRules err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func GetRuleRunStatus_Demo() {
    resp, err := aepapi.GetRuleRunStatus("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("GetRuleRunStatus err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func UpdateRuleRunStatus_Demo() {
    resp, err := aepapi.UpdateRuleRunStatus("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("UpdateRuleRunStatus err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func CreateForward_Demo() {
    resp, err := aepapi.CreateForward("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("CreateForward err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func UpdateForward_Demo() {
    resp, err := aepapi.UpdateForward("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("UpdateForward err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func DeleteForward_Demo() {
    resp, err := aepapi.DeleteForward("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("DeleteForward err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func GetForwards_Demo() {
    resp, err := aepapi.GetForwards("dFI1lzE0EN2", "xQcjrfNLvQ", "", "10015488", "", "")

    if err != nil {
        fmt.Println("GetForwards err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func GetWarns_Demo() {
    resp, err := aepapi.GetWarns("dFI1lzE0EN2", "xQcjrfNLvQ", "", "", "")

    if err != nil {
        fmt.Println("GetWarns err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func DeleteWarn_Demo() {
    resp, err := aepapi.DeleteWarn("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("DeleteWarn err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func UpdateWarn_Demo() {
    resp, err := aepapi.UpdateWarn("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("UpdateWarn err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func CreateWarn_Demo() {
    resp, err := aepapi.CreateWarn("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("CreateWarn err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func CreateAction_Demo() {
    resp, err := aepapi.CreateAction("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("CreateAction err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func UpdateAction_Demo() {
    resp, err := aepapi.UpdateAction("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("UpdateAction err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func DeleteAction_Demo() {
    resp, err := aepapi.DeleteAction("dFI1lzE0EN2", "xQcjrfNLvQ", "{}")

    if err != nil {
        fmt.Println("DeleteAction err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func GetActions_Demo() {
    resp, err := aepapi.GetActions("dFI1lzE0EN2", "xQcjrfNLvQ", "", "", "")

    if err != nil {
        fmt.Println("GetActions err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func GetWarnUsers_Demo() {
    resp, err := aepapi.GetWarnUsers("dFI1lzE0EN2", "xQcjrfNLvQ", "", "")

    if err != nil {
        fmt.Println("GetWarnUsers err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
